package com.jsu.clubmanagementsystem.service.application;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.common.PageQueryRequest;
import com.jsu.clubmanagementsystem.model.dto.activityapplication.ActivityApplicationAddRequest;
import com.jsu.clubmanagementsystem.model.dto.activityapplication.ActivityApplicationQueryRequest;
import com.jsu.clubmanagementsystem.model.entity.ActivityApplication;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jsu.clubmanagementsystem.model.entity.User;
import com.jsu.clubmanagementsystem.model.vo.activityApplication.ActivityApplicationVO;

import java.util.List;

/**
* @author 24753
* @description 针对表【activity_application(社团活动相关申请)】的数据库操作Service
* @createDate 2025-05-17 17:05:46
*/
public interface ActivityApplicationService extends IService<ActivityApplication> {

    /**
     * 处理活动申请
     *
     * @param addRequest 申请请求
     * @return 申请ID
     */
    Long processActivityApplication(ActivityApplicationAddRequest addRequest);

    /**
     * 获得封装对象
     *
     * @param activityApplication 活动申请实体
     * @return 活动申请VO
     */
    ActivityApplicationVO getActivityApplicationVO(ActivityApplication activityApplication);

    /**
     * 查询活动申请列表
     *
     * @param activityApplicationQueryRequest 查询请求
     * @return 分页结果
     */
    Page<ActivityApplicationVO> listActivityApplicationVOByPage(ActivityApplicationQueryRequest activityApplicationQueryRequest,
                                                                User user);

    /**
     * 申请是否存在
     *
     * @param applicationId
     * @return
     */
    boolean isExist(Long applicationId);

    /**
     * 申请是否存在
     *
     * @param applicationId
     * @param type
     * @return
     */
    boolean isExist(Long applicationId, Integer type);

    /**
     * 检查申请是否已存在
     *
     * @param activityApplication 申请对象
     * @return 是否存在
     */
    boolean isExist(ActivityApplication activityApplication);

    /**
     * 参数校验
     *
     * @param activityApplication 申请对象
     */
    void activityApplicationValidation(ActivityApplication activityApplication);

    /**
     * 获取查询封装
     *
     * @param activityApplicationQueryRequest 查询请求
     * @return
     */
    QueryWrapper<ActivityApplication> getQueryWrapper(ActivityApplicationQueryRequest activityApplicationQueryRequest);

    Page<ActivityApplication> getActivityApplicationVoPage(PageQueryRequest page);

    boolean deleteByIds(List<Long> ids);

}
